package designpattern.state;

/**
 * TODO:类描述
 *
 * @className: Room
 * @packageName: designpattern.state
 * @author: Zhuhj
 * @version: V1.0
 * @date: 2021/4/21 20:52
 */
public class Room {

    public State state ;
    public void setState(State state){
        this.state = state;
    }
    public void currentState(){
        state.getState();
    }


    protected void book() {
        state.book(this);
    }


    protected void unbook() {
        state.unbook(this);
    }


    protected void checkin() {
        state.checkin(this);
    }


    protected void checkout() {
        state.checkout(this);
    }
}
